#ifndef DAMECHINOISE_H
#define DAMECHINOISE_H

#include <QMainWindow>
#include<QtCore>
#include<QtGui>
#include<qpainter.h>
#include<qpen.h>
#include<qhash.h>
#include"cercle.h"
#include<QTcpSocket>

namespace Ui {
    class DameChinoise;
}

class DameChinoise : public QMainWindow
{
    Q_OBJECT

public:
    explicit DameChinoise(QWidget *parent = 0);
    ~DameChinoise();
    void paintEvent(QPaintEvent *e);
    void initEtoile();
    void initCouleur();
    void colorierZoneA(int x, int y, couleur c);
    void colorierZoneB(int x, int y, couleur c);
    void gererDeplacement(int x, int y);
    void setLabelText(QString texte);
    void setNumeroPort(int num);
    QHash <int , Cercle*> hash;
    QList<Cercle> liste;
    bool flag;
    QPoint source;
    QTcpSocket *socket;
    quint16 tailleMessage;



 public slots:

    void on_boutonConnexion_clicked();
    void on_boutonEnvoyer_clicked();
    void on_message_returnPressed();
    void donneesRecues();
    void connecte();
    void deconnecte();
    void erreurSocket(QAbstractSocket::SocketError erreur);


    void dessinerCercle(int x, int y );

public:
    Ui::DameChinoise *fendame;
    int r;
};

#endif // DAMECHINOISE_H
